package com.ticket.sass.admin.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ticket.sass.admin.mapper.OrderPayMapper;
import com.ticket.sass.admin.service.BaseService;
import com.ticket.sass.common.entity.tenant.OrderPayEntity;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ywb
 * @since 2024-05-30
 */
@Service
public class OrderPayServiceImpl extends ServiceImpl<OrderPayMapper, OrderPayEntity> implements BaseService<OrderPayEntity> {
    public OrderPayEntity getOneByOrderMixedId(Long orderMixedId) {
        // 创建 QueryWrapper 对象
        QueryWrapper<OrderPayEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("order_mixed_id", orderMixedId);
        queryWrapper.last("limit 1");
        return getOne(queryWrapper);
    }
}
